<html>

<head>
    <link type="text/css" rel="stylesheet" href="/stylesheets/plainold.css" />
</head>

<H4><a href="{{logout_url}}">{{logout_txt}}</a> <b>{{user}} - iRun</b> 
<a href="stats">My Runs</a>
<a href="charts">My Charts</a>
</H4>

<body>

<form action="/add" enctype="multipart/form-data" method="post">
      CSV upload:
     <input type="file" name="csv"/>
     <input type="submit" value="Upload">
</form>

<div>
<table>
<tr>
<td>
    <form action="/" method="POST">
    <table>
    {{ form.as_table }}
    </table>
    <p><input type="submit" value="Add"/></p>
    </form>
</td>
<td>
    <p>Longest Run: {{longest_run.distance}} at {{longest_run.date}}</p>
    <p>Fastest pace: {{max_pace.pace_max}} when {{max_pace.activity}}ing for {{max_pace.distance}} km</p>
    <p>Max hart rate: {{max_hart_rate.hr_max}} when {{max_hart_rate.activity}}ing for {{max_hart_rate.distance}} km</p>
</td>
<td>
    Fastest 5k: {{fastest_5k}}
    <p>Fastest 10k: {{fastest_10k}}</p>
    <p>Fastest 15k: {{fastest_15k}}</p>
    <p>Fastest 20k: {{fastest_20k}}</p>
</td>
</tr>
</table>
</div>

</body>
</html>
